<!DOCTYPE html>
<html>
<head>
  <meta content="IE=11.0000" http-equiv="X-Ua-Compatible">
  <meta charset="utf-8">
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-Ua-Compatible" content="IE=edge,chrome=1">
  <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
  <title>工程发包管理</title>
  
  <!--region 引入公用js和css -->
  <script>
    var HOST_S = "";
    var ctx = "";
  </script>
  
  <link href="../../assets/plugins/animate/animate.css" rel="stylesheet">
  <link href="../../assets/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
  <link href="../../assets/plugins/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" type="text/css"/>
  <link href="../../assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
  <link href="../../assets/plugins/bootstrap-switch/css/bootstrap-switch.min.css" rel="stylesheet" type="text/css"/>
  <link href="../../assets/plugins/fullcalendar/fullcalendar.css" rel="stylesheet" type="text/css"/>
  <link href="../../assets/base/css/components.css" rel="stylesheet" id="style_components" type="text/css"/>
  <link href="../../assets/base/css/plugins.css" rel="stylesheet" type="text/css"/>
  <link href="../../assets/ditop/layout.css" rel="stylesheet" type="text/css"/>
  <link href="../../assets/plugins/datatables/datatables.min.css" rel="stylesheet" type="text/css"/>
  <link href="../../assets/plugins/datatables/plugins/bootstrap/datatables.bootstrap.css" rel="stylesheet"
        type="text/css"/>
  <link href="../../assets/plugins/bootstrap-table/bootstrap-table.css" rel="stylesheet">
  <link href="../../assets/plugins/bootstrap-table/extensions/tree-column/bootstrap-table-tree-column.css"
        rel="stylesheet">
  <link href="../../assets/plugins/bootstrap-toastr/toastr.css" rel="stylesheet">
  <link href="../../assets/module/gcjsy/gcjsy-comp.css" rel="stylesheet">
  <link rel="stylesheet" href="../../assets/plugins/sweetalert/sweetalert.css">
  <link rel="stylesheet" href="../../assets/plugins/layer/theme/default/layer.css">
  
  
  <!-- CSS Customization -->
  <link href="../../assets/plugins/select2/css/select2.min.css" rel="stylesheet">
  <link href="../../assets/plugins/icheck/skins/flat/aero.css" rel="stylesheet">
  <link href="../../assets/ditop/ditop.css" rel="stylesheet">
  <link href="../../assets/ditop/style/ztree/style9/treestyle.css" rel="stylesheet">
  <link href="../../assets/plugins/bootstrap-touchspin/bootstrap.touchspin.css" rel="stylesheet">
  <link href="../../assets/plugins/bootstrap-datepicker/css/bootstrap-datepicker3.min.css" rel="stylesheet"
        type="text/css"/>
  <script src="../../assets/plugins/jquery/jquery.min.js"></script>
  <script src="../../assets/plugins/bootstrap/js/bootstrap.min.js"></script>
  <script src="../../assets/plugins/bootstrap-toastr/toastr.js"></script>
  <script src="../../assets/plugins/art-template/template.js"></script>
  <script src="../../assets/plugins/layer/layer.js"></script>
  <script src="../../assets/ditop/ditop.js"></script>
  
  <script src="../../assets/plugins/ztree/jquery.ztree.all.js"></script>
  <!--新增-->
  <!--<script src="bootstrap-table-fixed-columns.js"></script>-->
  <link rel="stylesheet" href="../drawing_review.css">
  <link rel="stylesheet" href="admin.css">
  
  <style>
  
  </style>
</head>

<body>
<div class="page-wrapper">
  <div class="page-header navbar">
    <div class="page-header-inner clearfix">
      <div class="logo pull-left">
        <a href="#"><img src="../../assets/images/logo/logo.png" alt="logo" class="logo-default"/> </a>
      </div>
      <div class="menu-toggler sidebar-toggler" style="height: 0"></div>
      <div class="main-menu pull-left">
        <ul class="nav navbar-nav">
          <li id="home">
            <span>首页</span>
          </li>
          <li>
            <div class="header-type">
              <span>动态</span>
            </div>
          </li>
          <li>
            <div class="header-type">
              <span>办事</span>
            </div>
          </li>
          <li class="active-menu">
            <div class="header-type">
              <span>应用</span>
            </div>
          </li>
        </ul>
      </div>
      <div class="top-menu pull-right">
        <ul class="nav navbar-nav">
          <li><a href="#"><i class="dtFont dtFont-msg"></i><span class="badge badge-danger"> 9 </span></a>
          </li>
          <li><a href="#"><i class="dtFont dtFont-naozhong"></i><span class="badge badge-info"> 1 </span></a></li>
          <li><a href="#"><i class="dtFont dtFont-gonggao"></i><span class="badge badge-info"></span></a></li>
          <li><a href="#"><i class="dtFont dtFont-help"></i></a></li>
          
          
          <li class="dropdown">
            <a href="#" class="dropdown-toggle user-info" data-toggle="dropdown"
               data-hover="dropdown" data-close-others="true"><i class="dtFont dtFont-my_icon"></i></a>
            <ul class="dropdown-menu dropdown-menu-default pull-right	">
              <li class="profile">
                <a href="javascript:;"> <i class="icon-user"></i> 个人中心</a>
              </li>
              <li class="changePassword">
                <a href="javascript:;"> <i class="icon-key"></i> 修改密码</a>
              </li>
              <li class="feedBack">
                <a href="javascript:;"> <i class="icon-bubbles"></i> 给管理员留言</a>
              </li>
              <li class="divider"></li>
              <li class="logout">
                <a href="javascript:;"> <i class="icon-close"></i>退出</a>
              </li>
            </ul>
          </li>
        </ul>
      </div>
    </div>
  </div>
  <div class="page-container clearfix">
    
    <div class="page-sidebar-wrapper pull-left" id="leftSec2">
      <div class="menu-toggler sidebar-toggler"></div>
      <div class="pageIcon">
        <div>
          
          <i class="dtFont dtFont-shencha"></i>
        
        </div>
        <p class="fmAx16">账号及权限管理</p>
      </div>
      <div class="page-sidebar navbar-collapse collapse">
        <div class="left-menu2">
          <ul class="page-sidebar-menu page-header-fixed" data-keep-expanded="false" data-auto-scroll="true"
              data-slide-speed="200">
            <li class="nav-item active open" title="">
              <a class="nav-link" href="#none">
                <i class="dtFont dtFont-daifenpei"></i>
                <span class="title">账号管理</span>
              </a>
            
            </li>
            <li class="nav-item" title="">
              <a class="nav-link" href="#none">
                <i class="dtFont dtFont-yifenpei"></i>
                <span class="title">角色管理</span>
              </a>
            
            </li>
            
            <li class="nav-item" title="">
              <a class="nav-link" href="#none">
                <i class="dtFont dtFont-yifenpei"></i>
                <span class="title">权限管理</span>
              </a>
            
            </li>
          </ul>
        </div>
      </div>
    </div>
    
    
    <div class="page-content-wrapper pull-right">
      <div class="page-content">
        <div class="admin-con clearfix">
          <div class="admin-con-left pull-left">
            <ul class="ztree" id="tree"></ul>
            <div class="no-base-data small">
              <p>暂无部门，请新增</p>
              <a id="addTree" href="javascript:;" class="basicsBtn blue">+&nbsp;&nbsp;&nbsp;新增部门</a>
            </div>
          </div>
          <div class="admin-con-right padding-lr-16 pull-right">
            <div class="admin-header clearfix">
              <a id="addAccount" href="javascript:;" class="often-btn blue margin-right-10">新建账号</a>
              <a href="javascript:;" class="often-btn gray">批量删除</a>
              <div class="input-icon right admin-search pull-right">
                <i class="fa icon-magnifier"></i>
                <input type="text" class="form-control" placeholder="请输入用户名称或身份证号码">
              </div>
            </div>
            <div class="admin-right-box">
              <table id="table"></table>
              <!--<div class="no-base-data">-->
                <!--<p>暂无账号，请创建账号</p>-->
              <!--</div>-->
            </div>
          </div>
        </div>
      
      
      </div>
    </div>
  
    <!--权限分配-->
    <div class="detail-mask-box power">
      <div class="detail-mask-con">
        <div class="mask-header">
          <div class="mask-header-title">权限分配-孟星魂（340827199411206330）</div>
          <div class="opinion-fixedT-close dtFont dtFont-guanbi"></div>
        </div>
        <div class="mask-content">
        
          <div class="mask-tab-con padding-lr-16">
            <h3 class="mask-subTitle margin-top-20">
              用户角色（2/100）
              <small style="color: #999999;font-size: 14px">（已选角色：项目负责人、项目负责人）</small>
            </h3>
            <ul class="navTabs mask-tabs zk clearfix">
              <li class="navItem active">项目负责人负责人</li>
              <li class="navItem">项目负责人负责人</li>
              <li class="navItem">项目负责人负责人</li>
              <li class="navItem">项目负责人负责人</li>
              <li class="navItem">项目负责人负责人</li>
              <li class="navItem">项目负责人负责人</li>
              <li class="navItem">项目负责人负责人</li>
              <li class="navItem">项目负责人负责人</li>
            </ul>
            <div class="mask-open-all">
              <span class="mask-open-btn">查看更多<i class="dtFont dtFont-xiala"></i></span>
            </div>
          </div>
          <div class="mask-tab-container">
            <h3 class="mask-subTitle margin-top-20 padding-lr-16">系统权限</h3>
            <ul class="navTabs tab-cut-list padding-lr-16 clearfix">
              <li class="navItem active">首页（600/1000）</li>
              <li class="navItem">动态（600/1000）</li>
              <li class="navItem">办事（600/1000）</li>
              <li class="navItem">应用中心（600/1000）</li>
            </ul>
          </div>
          <div class="tab-plane tabs-box clearfix">
            <div class="mask-tabs-left">
              <!--<div class="ztree" id="tree"></div>-->
            </div>
            <div class="mask-tabs-right">
              <h4 class="operateTitle">操作权限</h4>
              <ul class="operate-list clearfix">
                <li><a href="javascript:;">详情查看</a></li>
                <li><a href="javascript:;">发起聘用</a></li>
                <li><a href="javascript:;">详情查看</a></li>
                <li><a href="javascript:;">详情查看</a></li>
                <li><a href="javascript:;">详情查看</a></li>
                <li><a href="javascript:;">撤销申请</a></li>
                <li><a href="javascript:;">撤销申请</a></li>
                <li><a href="javascript:;">撤销申请</a></li>
                <li><a href="javascript:;">发起聘用</a></li>
                <li><a href="javascript:;">发起聘用</a></li>
                <li><a href="javascript:;">发起聘用</a></li>
       
                <li><a href="javascript:;">详情查看</a></li>
              </ul>
            </div>
          </div>
      
        
        </div>
      </div>
    </div>
  
    <!--查看-->
    <div class="detail-mask-box roleInfo">
      <div class="detail-mask-con">
        <div class="mask-header">
          <div class="mask-header-title">查看</div>
          <div class="opinion-fixedT-close dtFont dtFont-guanbi"></div>
        </div>
        <div class="mask-content clearfix">
     
          <div class="roleInfo-left padding-lr-16">
            <h3 class="mask-subTitle" style="padding-top: 16px">账号信息</h3>
            <div>
              <p>用户名：340827199411206330</p>
              <p>姓名：孟星魂</p>
              <p>所属部门：人事部</p>
              <p>账号状态：正常</p>
              <p>最后登录时间：2019/11/18  11:11</p>
            </div>
            <h3 class="mask-subTitle" style="padding-top: 30px">系统角色</h3>
            <ul class="roleInfo-list clearfix">
              <li title="负责人">负责人</li>
              <li title="项目负责人项目负责人">项目负责人项目负责人</li>
              <li title="项目负责人项目负责人">项目负责人项目负责人</li>
              <li title="负责人">负责人</li>
              <li title="项目负责人项目负责人">项目负责人项目负责人</li>
              <li title="项目负责人项目负责人">项目负责人项目负责人</li>
            </ul>
          </div>
          <div class="roleInfo-right clearfix">
            <h3 class="mask-subTitle">应用中心（600/1000）</h3>
            <div class="mask-tabs-left">
              <!--<div class="ztree" id="tree"></div>-->
            </div>
            <div class="mask-tabs-right">
            
            </div>
          </div>
      
      
        </div>
      </div>
    </div>
  </div>
</div>


<script>
  (function () {
    $('.mask-open-btn').click(function () {
      if(!$(this).hasClass('zk')){
        $(this).addClass('zk');
        $('.mask-tabs').addClass('zk');
      }else{
        $(this).removeClass('zk');
        $('.mask-tabs').removeClass('zk');
      }
    });
    $('.navItem').click(function () {
      var index = $(this).index();
      $(this).addClass('active').siblings().removeClass('active');
      // $('.tab-plane').eq(index).removeClass('hidden').siblings().addClass('hidden')
    });

    $('#addAccount').click(function () {
      Utils.openBox({
        title: '请选择单体',
        scaleWidth: false,
        area: ['900px', '556px'],
        url: '新增编辑账号.html',
        subWinCallback: function (data) {
          console.log(data)
        }
      })
    });

    var treeData = [{
      "code": "XXXXX",
      "name": "安徽德拓信息科技有限公司（75）",
      "children":[
        {
          "code": "XXXXX",
          "name": "安徽德拓信（75）",
          "children":[
            {
              "code": "XXXXX",
              "name": "安徽德（75）",
            },
            {
              "code": "XXXXX",
              "name": "安徽德（75）",
            }
          ]
        }, {
          "code": "XXXXX",
          "name": "安徽德拓信（75）",
        },
        {
          "code": "XXXXX",
          "name": "安徽德拓信（75）",
          "children":[
            {
              "code": "XXXXX",
              "name": "安徽德（75）",
            },
            {
              "code": "XXXXX",
              "name": "安徽德（75）",
            }
          ]
        },
        {
          "code": "XXXXX",
          "name": "安徽德拓信（75）",
          "children":[
            {
              "code": "XXXXX",
              "name": "安徽德（75）",
            },
            {
              "code": "XXXXX",
              "name": "安徽德（75）",
            }
          ]
        },
        {
          "code": "XXXXX",
          "name": "安徽德拓信（75）",
          "children":[
            {
              "code": "XXXXX",
              "name": "安徽德（75）",
            },
            {
              "code": "XXXXX",
              "name": "安徽德（75）",
            }
          ]
        },
        {
          "code": "XXXXX",
          "name": "安徽德拓信（75）",
          "children":[
            {
              "code": "XXXXX",
              "name": "安徽德（75）",
            },
            {
              "code": "XXXXX",
              "name": "安徽德（75）",
            }
          ]
        },
      ]
    }];

    var $tree = $("#tree"), zTreeObj;

    function init() {
      zTreeObj = $.fn.zTree.init($tree, {
        data: {
          key: {
            name: "name",
            code: "code"
          },
        },
        edit: {
          drag: {
            prve: true,
            next: true
          },
          enable: true,
          showRemoveBtn: setRemoveBtn,
          showRenameBtn: setRenameBtn,
          removeTitle: "删除节点",
          enameTitle: "编辑节点名称",
        },
        view: {
          addHoverDom: addHoverDom,
          removeHoverDom: removeHoverDom,
          // showLine: false
        },
        callback: {
          // onCheck: onCheck,
          // onClick:onClick
        }
      }, treeData);
    }

    init();

    function addHoverDom(treeId, treeNode) {
      var aObj;
      var addStr = "<span class='button add' id=" + treeNode.tId + "_add title='添加子节点' onclick=''></span>";
      if (treeNode.tId === 'tree_1') {
        aObj = $("#" + treeNode.tId + "_span");
        if (aObj.next().hasClass('add')) return;
        aObj.after(addStr);
      } else {
        aObj = $("#" + treeNode.tId + "_edit");
        if (aObj.prev().hasClass('add')) return;
        aObj.before(addStr);
      }
      var btn = $("#" + treeNode.tId + "_add");
      if (btn) btn.bind("click", function () {
        var newNode = {name: ""};
        var newNodez = zTreeObj.addNodes(treeNode, newNode);
        zTreeObj.editName(newNodez[0]);
      });
    }

    function removeHoverDom(treeId, treeNode) {
      $("#" + treeNode.tId + "_add").unbind().remove();
    }

    function setRemoveBtn(treeId, treeNode) {
      return treeNode.tId !== 'tree_1';
    }

    function setRenameBtn(treeId, treeNode) {
      return treeNode.tId !== 'tree_1';
    }
    
    $('#addTree').click(function () {
      var bObj=$("#tree_1_span");
      console.log(bObj)
      var addStr = "<span class='button add' id=" + treeNode.tId + "_add title='添加子节点' onclick=''></span>";
      if (bObj.next().hasClass('add')) return;
      bObj.after(addStr);
   
  })
  
  })();
</script>

<!--region 引入公用js和css -->
<script src="../../assets/plugins/sweetalert/sweetalert.min.js"></script>
<script src="../../assets/plugins/jquery.blockui.min.js"></script>
<script src="../../assets/plugins/js.cookie.min.js"></script>
<script src="../../assets/plugins/jquery-slimscroll/jquery.slimscroll.min.js"></script>
<script src="../../assets/plugins/jquery.blockui.min.js"></script>
<script src="../../assets/plugins/bootstrap-switch/js/bootstrap-switch.min.js"></script>
<script src="../../assets/plugins/bootstrap-touchspin/bootstrap.touchspin.js"></script>
<script src="../../assets/plugins/moment.min.js"></script>
<script src="../../assets/plugins/bootstrap-daterangepicker/daterangepicker.min.js"></script>
<script src="../../assets/plugins/counterup/jquery.waypoints.min.js"></script>
<script src="../../assets/plugins/counterup/jquery.counterup.min.js"></script>
<script src="../../assets/plugins/fullcalendar/fullcalendar.js"></script>
<script src="../../assets/plugins/horizontal-timeline/horizontal-timeline.js"></script>
<script src="../../assets/plugins/jquery.sparkline.min.js"></script>
<script src="../../assets/plugins/select2/js/select2.js"></script>
<script src="../../assets/plugins/select2/js/i18n/zh-CN.js"></script>
<script src="../../assets/plugins/ztree/jquery.ztree.all.js"></script>
<script src="../../assets/plugins/jquery-form/jquery.form.js"></script>
<script src="../../assets/plugins/jquery-validator/jquery.placeholder.min.js"></script>
<script src="../../assets/plugins/jquery-validator/jquery.validate.js"></script>
<script src="../../assets/plugins/jquery-validator/jquery.validate.custom.js"></script>
<script src="../../assets/plugins/jquery-validator/localization/messages_zh.js"></script>
<script src="../../assets/plugins/jquery-validator/additional-methods.js"></script>
<script src="../../assets/plugins/bootstrap-growl/jquery.bootstrap-growl.js"></script>
<script src="../../assets/plugins/bootstrap-table/bootstrap-table.js"></script>
<script src="../../assets/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.js"></script>
<script src="../../assets/plugins/bootstrap-table/extensions/tree-column/bootstrap-table-tree-column.js"></script>
<script src="../../assets/base/scripts/app.js"></script>
<script src="../../assets/base/scripts/theme.js"></script>
<script src="../../assets/ditop/ditop-addition.js"></script>
<script src="../../assets/plugins/bootstrap-datepicker/js/bootstrap-datepicker.min.js" type="text/javascript"></script>
<script src="../../assets/plugins/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js"
        type="text/javascript"></script>
<script type="text/javascript" src="../../assets/plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"
        charset="UTF-8"></script>
<script type="text/javascript"
        src="../../assets/plugins/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"
        charset="UTF-8"></script>
<script src="../../assets/plugins/jquery-validator/jquery.validate.custom.js"></script>
<script src="../../assets/ditop/layout.js"></script>
<!--endregion-->

<script src="../../assets/module/gcjsy/js/content.js"></script>
<script>
  var data= [{
    a: 1, b: '孟星魂',
    c: '320121199310011137', d: '13100000001', e: '技术员',
    f: '工程技术部主管...', h: '2016/09/21  20:20'
  }, {
    a: 2, b: '孟星魂',
    c: '320121199310011137', d: '13100000001', e: '技术员',
    f: '工程技术部主管...', h: '2016/09/21  20:20'
  }, {
    a: 3, b: '孟星魂',
    c: '320121199310011137', d: '13100000001', e: '技术员',
    f: '工程技术部主管...', h: '2016/09/21  20:20'
  }, {
    a: 4, b: '孟星魂',
    c: '320121199310011137', d: '13100000001', e: '技术员',
    f: '工程技术部主管...', h: '2016/09/21  20:20'
  }, {
    a: 5, b: '孟星魂',
    c: '320121199310011137', d: '13100000001', e: '技术员',
    f: '工程技术部主管...', h: '2016/09/21  20:20'
  }, {
    a: 6, b: '孟星魂',
    c: '320121199310011137', d: '13100000001', e: '技术员',
    f: '工程技术部主管...', h: '2016/09/21  20:20'
  }, {
    a: 7, b: '孟星魂',
    c: '320121199310011137', d: '13100000001', e: '技术员',
    f: '工程技术部主管...', h: '2016/09/21  20:20'
  }, {
    a: 8, b: '孟星魂',
    c: '320121199310011137', d: '13100000001', e: '技术员',
    f: '工程技术部主管...', h: '2016/09/21  20:20'
  }, {
    a: 9, b: '孟星魂',
    c: '320121199310011137', d: '13100000001', e: '技术员',
    f: '工程技术部主管...', h: '2016/09/21  20:20'
  }, {
    a: 10, b: '孟星魂',
    c: '320121199310011137', d: '13100000001', e: '技术员',
    f: '工程技术部主管...', h: '2016/09/21  20:20'
  }]

  $("#table").bootstrapTable({
    //url: "/g/psPersonQuery/queryData/" + $("#searchVal").val(),
    //method: 'post',
    pagination: true,
    classes: 'table table-bordered',
    paginationPreText: "上一页",
    paginationNextText: '下一页',
    paginationHAlign: 'left', //right, left
    paginationVAlign: 'bottom', //bottom, top, both
    paginationDetailHAlign: 'right', //right, left
    showColumns : false,
    columns: [
      {checkbox: true},
      {
        field: 'a',
        title: '序号',
        width: 70,
        class: 'text-center'
      }, {
        field: 'b',
        title: '用户',
        formatter: function (value, row, index) {
          return "<a href='javascript:;' class='viewContainer'>"+value+"</a>";
        }
      }, {
        field: 'c',
        title: '身份证号码',
      }, {
        field: 'd',
        title: '手机',
      }, {
        field: 'e',
        title: '所属部门',

      }, {
        field: 'f',
        title: '所属角色',
      }, {
        field: 'g',
        title: '账号状态',
        formatter: function (value, row, index) {
            return '<div class="tab_switch">' +
              '        <label>' +
              '          <input type="checkbox" checked>' +
              '          <span class="labelCon"></span>' +
              '          <span class="tab_switch_box">' +
              '             <span class="onText">禁用</span>' +
              '             <span class="labelText"></span>' +
              '             <span class="offText">启用</span>' +
              '          </span>' +
              '        </label>' +
              '      </div>';
          }
      }, {
        field: 'h',
        title: '最后登录时间',
        sortable: true
      }, {
        field: '',
        title: '操作',
        class: 'text-center',
        formatter: function (value, row, index) {
          return '<a href="javascript:;" class="powerBtn">权限设置</a><a href="javascript:;">编辑</a><a href="javascript:;">删除</a>';
        }
      }
    ],
    data:data
    })

  $('.viewContainer').click(function () {
    $('.roleInfo').slideDown(300)
  });

  
  $('.powerBtn').click(function () {
    $('.power').slideDown(300)
  });
  
  $('.opinion-fixedT-close').click(function () {
    $('.detail-mask-box').slideUp(300)
  });

</script>
</body>
</html>
